<template>
  <el-card>
    <div class="card_title">{{ title }}</div>
    <div class="card_value">{{ value }}</div>
    <div class="card_echart">
      <slot />
    </div>
    <div class="card_footer">
      <slot name="footer" />
    </div>
  </el-card>
</template>

<script lang="ts">
export default {
  name: "CommonCard",
};
</script>

<script lang="ts" setup>
defineProps<{
  title: string;
  value: number;
}>();
</script>

<style scoped>
.card_title {
  font-size: 12px;
  color: #999;
}
.card_value {
  font-size: 25px;
  margin: 5px 0;
  letter-spacing: 1px;
}
.card_echart {
  /* background-color: #eee; */
  height: 50px;
  width: 100%;
}
.card_footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-size: 12px;
  color: #666;
}
</style>
